from base.base_other_page import BaseObject, BaseOperate


class ForcesInfoPage(BaseObject):
    """
    势力信息页
    """

    def __init__(self):
        super().__init__()
        # 势力宝藏按钮
        self.forces_treasure = "treasure"

    # 定位势力宝藏按钮
    def find_treasure_btn(self):
        return self.get_element_by_parent(self.forces_treasure)


class ForcesInfoOperate(BaseOperate):
    def __init__(self):
        self.fip = ForcesInfoPage()

    def click_treasure_btn(self):
        self.fip.find_treasure_btn().click()


class ForcesInfoBusiness:
    def __init__(self):
        self.fio = ForcesInfoOperate()

    def open_treasure_page(self):
        """
        打开势力宝藏页
        :return:
        """
        self.fio.click_treasure_btn()
